In recent years, an image processing apparatus device has been developed using a solid-state imaging sensor with a large number of pixels as an imaging element. It is possible for the solid-state imaging sensor to have defective pixels, which are caused by a manufacturing process, or after being used for a long period, or the like. Techniques to detect and correct such defective pixels have been investigated, to avoid degradation of image quality.
For example, a technique is disclosed in Japanese Laid-Open Patent Application No. H09-247548 that a defect inspection is performed, in a test for detecting a defective pixel, for a pixel to be tested, based on the magnitude of a difference in the pixel value between a pixel and each of its surrounding pixels, and the pixel value of the pixel determined defective is replaced with a pixel value of a surrounding pixel.